<?php
namespace App\Http\Controllers\Admin\Order;

use App\Services\Admin\OrderService;
use App\Utilities\JiugeForm;
use Illuminate\Http\Request;

class MakeController extends BaseController
{
    /**
     * 货单
     */

    protected $view = 'admin.order.make.';//视图前缀
    protected $url = 'make';//路由前缀
    protected $model;
    protected $formElementArr = [//表单元素
        //array(表单选项,中文名称,name字段名称,表单提示,js验证规则)
//        array(1,'岗位名称','name','岗位名称，2-20字符',1),
//        array(5,'所属父级','pid','父级分类',6),
    ];
//    protected $fieldShowArr = [
//        'id' => 'ID',
//        'name' => '岗位名称',
//        'pid' => '所属父级',
//        'createTime' => '创建时间',
//    ];

    public function __construct()
    {
        parent::__construct();
        $this->prefix_url = $this->prefix_url.'/'.$this->url;
        $this->model = new OrderService();
        view()->share('prefix_url',$this->prefix_url);
        view()->share('jiugeForm',new JiugeForm($this->prefix_url));
    }

    public function index()
    {
//        dd('加工单');
        $models = $this->model->getIndex();
        return view($this->view.'index',array(
            'datas' => $models,
        ));
    }
}
